package com.zhang.order.mapper;

import com.zhang.order.dto.UserEarningsDTO;
import com.zhang.order.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhang.order.vo.UserEarningsVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 订单 Mapper 接口
 * </p>
 *
 * @author 创世神
 * @since 2023-12-05
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    /**查询金额汇总
     * @param userId
     * @return {@link UserEarningsVO}
     */
    List<UserEarningsDTO> getUserEarnings(Long userId);
}
